﻿using IDarling.Entity;
using Newtonsoft.Json.Linq;
using NPortableEngine;
using System.Collections.Generic;

namespace IDarling.BLL.Parser
{
    public class AIDAXiuParser : NParser
    {
        public override void ParseJson(string json, ScouterBackData backData)
        {
            List<AIDAXiuEntity> aidaxiuList = (List<AIDAXiuEntity>)backData.ResponseData;
            var jobj = JObject.Parse(json);
            JToken jArray = jobj.SelectToken("data");
            foreach (JToken jtoken in jArray)
            {
                AIDAXiuEntity model = new AIDAXiuEntity(jtoken.Value<string>("uid"), jtoken.Value<string>("uname"), jtoken.Value<string>("cover"));
                aidaxiuList.Add(model);
            }
        }
    }
}
